﻿@{
    string pointId = ViewBag.pointId;
    string StationId = ViewBag.StationId;
}
<div class="module-container">
    <div class="search-panel">
        <form class="form-inline search-table">
            <div class="form-group">
                <select class="form-control uiselect uiselectsubmit" name="PointID"
                        data-has-text-field="true">
                    @Html.CheckPointsCategoryOption(pointId)
                </select>
            </div>
            <div class="form-group">
                <select class="form-control uiselect uiselectsubmit" name="StationId"
                        data-has-text-field="false" data-width="150">
                    @Html.EmptyOption("所有客运站")
                    @Html.StationCategoryOption()
                </select>
            </div>
            <div class="form-group">
                <div class="input-group date w165px uidate">
                    <input class="form-control" name="startDate" type="text" value="@DateTimeHelper.FormatDate(DateTime.Now.Date,"yyyy-MM-dd")" placeholder="请选择开始日期">
                    <span class="input-group-addon">
                        <i class="glyphicon glyphicon-th"></i>
                    </span>
                </div>
            </div>
            <div class="form-group">
                <div class="input-group date w165px uidate">
                    <input class="form-control" name="endDate" type="text" placeholder="请选择结束日期">
                    <span class="input-group-addon">
                        <i class="glyphicon glyphicon-th"></i>
                    </span>
                </div>
            </div>

            <button class="btn btn-primary" type="submit">
                <i class="fa fa-search"></i> 查询
            </button>

            <a id="InspectorRegistrationSum_export" class="btn btn-default" data-url="@Url.Action("Export")">
                <i class="fa fa-share-square-o"></i> 导出
            </a>

        </form>
    </div>
    <div class="uitable" data-url="@Url.Action("Grid",new { startDate = DateTimeHelper.FormatDate(DateTime.Now.Date),PointID = pointId,StationId=StationId })">
        @Html.Action("Grid", new { startDate = DateTimeHelper.FormatDate(DateTime.Now.Date), PointID = pointId,StationId = StationId })
    </div>
</div>
<script>

    $('#InspectorRegistrationSum_export').on('click', function () {
        var url = $(this).data('url') + '?' + $.param(fx.serializeForm($('.search-table')));
        window.location.href = url;
    });

</script>